package jpa.entitys.promis.construction;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the COST_CONTRACT_DEDUCT_PO database table.
 * 
 */
@Embeddable
public class CostContractDeductPoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String company;

	private String project;

	@Column(name="REQUEST_TYPE")
	private String requestType;

	@Column(name="REQUEST_SERIES")
	private String requestSeries;

	@Column(name="REQUEST_NO")
	private long requestNo;

	private long seq;

	public CostContractDeductPoPK() {
	}
	public String getCompany() {
		return this.company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getProject() {
		return this.project;
	}
	public void setProject(String project) {
		this.project = project;
	}
	public String getRequestType() {
		return this.requestType;
	}
	public void setRequestType(String requestType) {
		this.requestType = requestType;
	}
	public String getRequestSeries() {
		return this.requestSeries;
	}
	public void setRequestSeries(String requestSeries) {
		this.requestSeries = requestSeries;
	}
	public long getRequestNo() {
		return this.requestNo;
	}
	public void setRequestNo(long requestNo) {
		this.requestNo = requestNo;
	}
	public long getSeq() {
		return this.seq;
	}
	public void setSeq(long seq) {
		this.seq = seq;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof CostContractDeductPoPK)) {
			return false;
		}
		CostContractDeductPoPK castOther = (CostContractDeductPoPK)other;
		return 
			this.company.equals(castOther.company)
			&& this.project.equals(castOther.project)
			&& this.requestType.equals(castOther.requestType)
			&& this.requestSeries.equals(castOther.requestSeries)
			&& (this.requestNo == castOther.requestNo)
			&& (this.seq == castOther.seq);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.company.hashCode();
		hash = hash * prime + this.project.hashCode();
		hash = hash * prime + this.requestType.hashCode();
		hash = hash * prime + this.requestSeries.hashCode();
		hash = hash * prime + ((int) (this.requestNo ^ (this.requestNo >>> 32)));
		hash = hash * prime + ((int) (this.seq ^ (this.seq >>> 32)));
		
		return hash;
	}
}